feat: add initial username INBOUND and Usync support#2480
feat: add initial username INBOUND and Usync support#2480purpshell merged 4 commits intoWhiskeySockets:masterfrom
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (16)
📝 WalkthroughWalkthroughThis PR introduces username support across the Baileys codebase by adding optional Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thanks for opening this pull request and contributing to the project! The next step is for the maintainers to review your changes. If everything looks good, it will be approved and merged into the main branch. In the meantime, anyone in the community is encouraged to test this pull request and provide feedback. ✅ How to confirm it worksIf you’ve tested this PR, please comment below with: This helps us speed up the review and merge process. 📦 To test this PR locally:If you encounter any issues or have feedback, feel free to comment as well. |
|
Nice! |
* feat: add inbound username support and USync username protocol Aligns with Baileys upstream PR WhiskeySockets#2480. WhatsApp is rolling out an inbound username field that maps to the user's LID. This change is purely additive — it captures and propagates the new optional field through types, decoders, USync queries, and group/contact events. Skipped intentionally to preserve InfiniteAPI's LID/PN customization: - handleGroupNotification in messages-recv.ts (custom LID->PN flow on groups.upsert / participants.map). Username for these specific events still flows via process-message's emitParticipantsUpdate (reads message.key.participantUsername added in decode-wa-message). Carousel/buttons code (messages.ts, messages-send.ts) untouched. Co-Authored-By: Renato Alcara
…#2480), abprops fix (WhiskeySockets#2473), JID streamlining (WhiskeySockets#2352), app state sync resilience (WhiskeySockets#2350), history sync perf (WhiskeySockets#2333), tctoken lifecycle (WhiskeySockets#2339), albums (WhiskeySockets#2058), enriched call events (WhiskeySockets#2355), updateBlockStatus validation (WhiskeySockets#2265), music-metadata pin (WhiskeySockets#2413), dup-imports fix (WhiskeySockets#2496) Resolved chats.ts import conflicts: union of fork + upstream symbols (added ensureLTHashStateVersion, isAppStateSyncIrrecoverable, isMissingKeyError, MAX_SYNC_ATTEMPTS, isLidUser, isPnUser, isHostedLidUser, isHostedPnUser). yarn.lock taken from upstream.
… state resilience WhiskeySockets#2350, JID streamlining WhiskeySockets#2352, abprops fix WhiskeySockets#2473) + cherry-picks (decodeFrame crash-loop guard WhiskeySockets#2402, LID-aware onWhatsApp WhiskeySockets#2403)
This PR adds inbound username support in Baileys for when WhatsApp starts sending those fields.
Based on the current WA Web implementation, username maps to the user’s LID, not to a separate independent third identifier.
Summary by CodeRabbit